// import { UnityEngine } from "csharp";
import { Event, Node } from "cc";
// import { $typeof } from "puerts";
import { BindNode } from "./BindNode";

// type Button = UnityEngine.UI.Button;

export class ButtonEven
{

    /**
     * 移除按钮上旧的回调,设置新的回调
     * @param node 
     * @param callback 
     */
    public static SetClickEvent(node:BindNode,callback:()=>void)
    {
        node.uObj.on(Node.EventType.TOUCH_END,callback)

        // var btn =  node.uObj.GetComponentInChildren($typeof(UnityEngine.UI.Button)) as Button       
        // btn.onClick.RemoveAllListeners();
        // btn.onClick.AddListener(callback);
    }

    

}